#include <bits/stdc++.h>
using namespace std;
map<char, int> m;
int main() {
  for (char ch = 'a'; ch <= 'r'; ch++) {
    m[ch] = (ch - 'a') % 3 + 1;
  }

  m['s'] = 4;

  m['t'] = 1;
  m['u'] = 2;
  m['v'] = 3;

  m['w'] = 1;
  m['x'] = 2;
  m['y'] = 3;
  m['z'] = 4;

  m[' '] = 1;

  string s;
  getline(cin, s);
  int ans = 0;
  for (auto ch : s) {
    ans += m[ch];
  }
  cout << ans;

  return 0;
}